﻿#pragma once

#include "Types.h"
#include <vtkm/cont/DataSet.h>

class Mesh;

namespace MeshTool
{
struct UpdateCoordinateSyatemWorklet;

  /// @brief 由Cell和Point信息，构建Face的拓扑关系
/// @param input mesh
void BuildFaceTopo(Mesh& mesh, const std::map<std::string, UInt8>& bnd_name_id);

vtkm::cont::DataSet CreateStructuredMesh(const Id2& point_dim,
                                         const Vec2f& orign,
                                         const Vec2f& space);

vtkm::cont::DataSet CreateStructuredMesh(const Id3& point_dim,
                                         const Vec3f& orign,
                                         const Vec3f& space);

/// 更新data_set的Coordinate，使其索引具有实际内存
void UpdateCoordinateSyatem(vtkm::cont::DataSet& data_set);

void CreateUnstructuredMesh();

/// @brief 三角化网格
/// @param mesh 
void TriangulateMesh(Mesh& mesh);
}